<template>
  <div class="orderItem" v-if="good.s_good">
    <img :src="good.s_good.s_goods_photos[0].path" alt="" />
    <p class="name">{{ good.s_good.name }}</p>
    <p class="num">x {{ good.num }}</p>
    <p class="price"><span>价格: </span>{{ good.s_good.price * good.num }}</p>
    <p class="subtotal">小计：{{ good.num * good.s_good.price * good.num }}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: ["good"],
  mounted() {},
};
</script>

<style lang="scss" scoped>
.orderItem {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  height: 200px;
  box-shadow: 0 5px 10px lightgray;
  img {
    width: 170px;
    height: 170px;
  }
  .name {
    width: 300px;
    height: 100px;
    line-height: 100px;
    font-size: 16px;
    font-weight: 700;
  }
  .num,
  .price,
  .subtotal {
    width: 100px;
  }
}
</style>
